package com.cxhc.system.service.app.impl;

import java.util.List;
import com.cxhc.common.utils.DateUtils;
import com.cxhc.system.domain.app.CmHandlingInfo;
import com.cxhc.system.mapper.app.CmHandlingInfoMapper;
import com.cxhc.system.service.app.ICmHandlingInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 警情举报Service业务层处理
 * 
 * @author Dhq
 * @date 2024-11-14
 */
@Service
public class CmHandlingInfoServiceImpl implements ICmHandlingInfoService
{
    @Autowired
    private CmHandlingInfoMapper cmHandlingInfoMapper;

    /**
     * 查询警情举报
     * 
     * @param id 警情举报主键
     * @return 警情举报
     */
    @Override
    public CmHandlingInfo selectCmHandlingInfoById(Long id)
    {
        return cmHandlingInfoMapper.selectCmHandlingInfoById(id);
    }

    /**
     * 查询警情举报列表
     * 
     * @param cmHandlingInfo 警情举报
     * @return 警情举报
     */
    @Override
    public List<CmHandlingInfo> selectCmHandlingInfoList(CmHandlingInfo cmHandlingInfo)
    {
        return cmHandlingInfoMapper.selectCmHandlingInfoList(cmHandlingInfo);
    }

    /**
     * 新增警情举报
     * 
     * @param cmHandlingInfo 警情举报
     * @return 结果
     */
    @Override
    public int insertCmHandlingInfo(CmHandlingInfo cmHandlingInfo)
    {
        cmHandlingInfo.setCreateTime(DateUtils.getTime());
        return cmHandlingInfoMapper.insertCmHandlingInfo(cmHandlingInfo);
    }

    /**
     * 修改警情举报
     * 
     * @param cmHandlingInfo 警情举报
     * @return 结果
     */
    @Override
    public int updateCmHandlingInfo(CmHandlingInfo cmHandlingInfo)
    {
        cmHandlingInfo.setUpdateTime(DateUtils.getTime());
        return cmHandlingInfoMapper.updateCmHandlingInfo(cmHandlingInfo);
    }

    /**
     * 批量删除警情举报
     * 
     * @param ids 需要删除的警情举报主键
     * @return 结果
     */
    @Override
    public int deleteCmHandlingInfoByIds(Long[] ids)
    {
        return cmHandlingInfoMapper.deleteCmHandlingInfoByIds(ids);
    }

    /**
     * 删除警情举报信息
     * 
     * @param id 警情举报主键
     * @return 结果
     */
    @Override
    public int deleteCmHandlingInfoById(Long id)
    {
        return cmHandlingInfoMapper.deleteCmHandlingInfoById(id);
    }
}
